load("@rules_java//java:defs.bzl", "java_library")

package(
    default_applicable_licenses = ["//:license"],
    default_testonly = True,
    default_visibility = ["//testing:__pkg__"],
)

java_library(
    name = "baseline_test_case",
    srcs = [
        "BaselineTestCase.java",
    ],
    deps = [
        ":line_differ",
        "@maven//:com_google_guava_guava",
        "@maven//:junit_junit",
    ],
)

java_library(
    name = "line_differ",
    srcs = ["LineDiffer.java"],
    deps = [
        "//:auto_value",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "adorner",
    srcs = [
        "CelAdorner.java",
        "CelDebug.java",
    ],
    deps = [
        "@cel_spec//proto/cel/expr:syntax_java_proto",
        "@maven//:com_google_guava_guava",
    ],
)

java_library(
    name = "cel_baseline_test_case",
    srcs = ["CelBaselineTestCase.java"],
    deps = [
        ":baseline_test_case",
        "//:java_truth",
        "//common:cel_ast",
        "//common:compiler_common",
        "//common:container",
        "//common:options",
        "//common/types:cel_types",
        "//common/types:message_type_provider",
        "//common/types:type_providers",
        "//compiler",
        "//compiler:compiler_builder",
        "//extensions:comprehensions",
        "//parser:macro",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "base_interpreter_test",
    testonly = 1,
    srcs = [
        "BaseInterpreterTest.java",
    ],
    resources = [
        "//common/resources/testdata/proto3:test_all_types_file_descriptor_set",
        "//runtime/testdata",
    ],
    deps = [
        ":cel_baseline_test_case",
        "//:java_truth",
        "//common:cel_ast",
        "//common:container",
        "//common:options",
        "//common:proto_ast",
        "//common/internal:cel_descriptor_pools",
        "//common/internal:file_descriptor_converter",
        "//common/internal:proto_time_utils",
        "//common/resources/testdata/proto3:standalone_global_enum_java_proto",
        "//common/types",
        "//common/types:type_providers",
        "//common/values:cel_byte_string",
        "//extensions:optional_library",
        "//runtime",
        "//runtime:function_binding",
        "//runtime:late_function_binding",
        "//runtime:unknown_attributes",
        "@cel_spec//proto/cel/expr:checked_java_proto",
        "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto",
        "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_protobuf_protobuf_java_util",
        "@maven//:junit_junit",
        "@maven_android//:com_google_protobuf_protobuf_javalite",
    ],
)
